<?php

/**
 * JingYao-backend
 *
 * @link     https://gitee.com/wang-zhihui-release/jingyao-backend
 * @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateRecruitmentsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('recruitments', function (Blueprint $table) {
            $table->id();
            $table->string('company_name')->nullable()->comment('招聘企业名称');
            $table->string('company_pic')->nullable()->comment('招聘企业照片');
            $table->string('company_desc')->nullable()->comment('招聘企业介绍');
            $table->string('contacts_name')->nullable()->comment('联系人姓名');
            $table->string('contacts_phone')->nullable()->comment('联系人电话');
            $table->string('job_name')->nullable()->comment('职位名称');
            $table->text('job_desc')->comment('招聘需求');
            $table->string('job_address')->nullable()->comment('工作地点');
            $table->integer('user_id')->default(0)->comment('发布人');
            $table->integer('push_time')->default(0)->comment('发布时间');
            $table->integer('expire_time')->default(0)->comment('过期时间');
            $table->tinyInteger('check_status')->default(0)->comment('审核状态 1: 通过 2: 拒绝 3: 审核中');
            $table->string('check_message')->default(0)->comment('审核备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('recruitments');
    }
}
